class Information {
  final int? id;
  final String title;
  final String content;
  final String? imageUrl;
  final String publishDate;
  final int publisherId;

  Information({
    this.id,
    required this.title,
    required this.content,
    this.imageUrl,
    required this.publishDate,
    required this.publisherId,
  });

  factory Information.fromMap(Map<String, dynamic> map) {
    return Information(
      id: map['id'],
      title: map['title'],
      content: map['content'],
      imageUrl: map['imageUrl'],
      publishDate: map['publishDate'],
      publisherId: map['publisherId'],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'title': title,
      'content': content,
      'imageUrl': imageUrl,
      'publishDate': publishDate,
      'publisherId': publisherId,
    };
  }
}
